home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr48 / tsbat146.zip / SUBS.BAT < prev    next >
DOS Batch File  |  1993-01-24  |  855b  |  29 lines

  1. @echo off
  2. echo ┌───────────────────────────────────────────────────┐
  3. echo │ Make the current directory a substituted drive    │
  4. echo │ By Prof. Timo Salmi, ts@uwasa.fi, Sun 24-Jan-1993 │
  5. echo └───────────────────────────────────────────────────┘
  6. echo.
  7.  
  8. rem Customize if you wish to designate something else than drive Q:
  9. set drive_=Q:
  10.  
  11. rem Remove the potential old substitution
  12. if not exist %drive_%\nul goto _doit
  13. echo Drive %drive_% already substituted, deleting the old substitution
  14. subst %drive_% /d
  15. echo.
  16.  
  17. :_doit
  18. rem Make the substitution
  19. echo @echo off> director.bat
  20. echo subst %%drive_%% %%2>> director.bat
  21. dir | find "Directory"> go$$$.bat
  22. call go$$$
  23. if exist director.bat del director.bat
  24. if exist go$$$.bat del go$$$.bat
  25. echo The current substitution for drive %drive_% is
  26. subst | find "%drive_% ="
  27. set drive_=
  28. echo.
  29.